const Timestamp= new Date().getTime()
module.exports = {
  publicPath: './',
  outputDir: 'dist',
  assetsDir: 'static',
  productionSourceMap:false,
  lintOnSave: true,
  runtimeCompiler: true, //关键点在这
  devServer: {
    proxy: {
      '/api': {

        target: 'http://127.0.0.1:8000', //API服务器的地址
        secure: false,
        changeOrigin: true, // 是否跨域，虚拟的站点需要更管origin
        pathRewrite: {
          '^/api':''
        }
      },
    }
  },
  configureWebpack: { // js 配置
    output: { // 输出重构  打包编译后的 文件名称
      // filename: `static/js/[name].${process.env.OS}.${Timestamp}.js`,
      //  chunkFilename: `static/js/[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
      filename: `static/js/[name].${Timestamp}.js`,
      chunkFilename: `static/js/[name].${Timestamp}.js`
    },
  },
  css: { // css 配置
    extract: {
      // 修改打包后css文件名
      filename: `css/[name].${Timestamp}.css`,
      chunkFilename: `css/[name].${Timestamp}.css`
    }
  },
};

